Optimal. Leaf size=242 \[ -\frac {d^2 i^2 \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^3 g^3}-\frac {d i^2 (c+d x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^2 g^3 (a+b x)}-\frac {i^2 (c+d x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 b g^3 (a+b x)^2}+\frac {B d^2 i^2 n \text {Li}_2\left (\frac {b (c+d x)}{d (a+b x)}\right )}{b^3 g^3}-\frac {B d i^2 n (c+d x)}{b^2 g^3 (a+b x)}-\frac {B i^2 n (c+d x)^2}{4 b g^3 (a+b x)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.56, antiderivative size = 354, normalized size of antiderivative = 1.46, number of steps used = 18, number of rules used = 11, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.256, Rules used = {2528, 2525, 12, 44, 2524, 2418, 2390, 2301, 2394, 2393, 2391} \[ \frac {B d^2 i^2 n \text {PolyLog}\left (2,-\frac {d (a+b x)}{b c-a d}\right )}{b^3 g^3}+\frac {d^2 i^2 \log (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^3 g^3}-\frac {2 d i^2 (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{b^3 g^3 (a+b x)}-\frac {i^2 (b c-a d)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 b^3 g^3 (a+b x)^2}+\frac {B d^2 i^2 n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 g^3}-\frac {3 B d i^2 n (b c-a d)}{2 b^3 g^3 (a+b x)}-\frac {B i^2 n (b c-a d)^2}{4 b^3 g^3 (a+b x)^2}-\frac {B d^2 i^2 n \log ^2(a+b x)}{2 b^3 g^3}-\frac {3 B d^2 i^2 n \log (a+b x)}{2 b^3 g^3}+\frac {3 B d^2 i^2 n \log (c+d x)}{2 b^3 g^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 44
Rule 2301
Rule 2390
Rule 2391
Rule 2393
Rule 2394
Rule 2418
Rule 2524
Rule 2525
Rule 2528
Rubi steps
\begin {align*} \int \frac {(123 c+123 d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(a g+b g x)^3} \, dx &=\int \left (\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 g^3 (a+b x)^3}+\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 g^3 (a+b x)^2}+\frac {15129 d^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2 g^3 (a+b x)}\right ) \, dx\\ &=\frac {\left (15129 d^2\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{a+b x} \, dx}{b^2 g^3}+\frac {(30258 d (b c-a d)) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a+b x)^2} \, dx}{b^2 g^3}+\frac {\left (15129 (b c-a d)^2\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a+b x)^3} \, dx}{b^2 g^3}\\ &=-\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b^3 g^3 (a+b x)^2}-\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3 (a+b x)}+\frac {15129 d^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3}-\frac {\left (15129 B d^2 n\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (a+b x)}{a+b x} \, dx}{b^3 g^3}+\frac {(30258 B d (b c-a d) n) \int \frac {b c-a d}{(a+b x)^2 (c+d x)} \, dx}{b^3 g^3}+\frac {\left (15129 B (b c-a d)^2 n\right ) \int \frac {b c-a d}{(a+b x)^3 (c+d x)} \, dx}{2 b^3 g^3}\\ &=-\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b^3 g^3 (a+b x)^2}-\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3 (a+b x)}+\frac {15129 d^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3}-\frac {\left (15129 B d^2 n\right ) \int \left (\frac {b \log (a+b x)}{a+b x}-\frac {d \log (a+b x)}{c+d x}\right ) \, dx}{b^3 g^3}+\frac {\left (30258 B d (b c-a d)^2 n\right ) \int \frac {1}{(a+b x)^2 (c+d x)} \, dx}{b^3 g^3}+\frac {\left (15129 B (b c-a d)^3 n\right ) \int \frac {1}{(a+b x)^3 (c+d x)} \, dx}{2 b^3 g^3}\\ &=-\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b^3 g^3 (a+b x)^2}-\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3 (a+b x)}+\frac {15129 d^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3}-\frac {\left (15129 B d^2 n\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{b^2 g^3}+\frac {\left (15129 B d^3 n\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{b^3 g^3}+\frac {\left (30258 B d (b c-a d)^2 n\right ) \int \left (\frac {b}{(b c-a d) (a+b x)^2}-\frac {b d}{(b c-a d)^2 (a+b x)}+\frac {d^2}{(b c-a d)^2 (c+d x)}\right ) \, dx}{b^3 g^3}+\frac {\left (15129 B (b c-a d)^3 n\right ) \int \left (\frac {b}{(b c-a d) (a+b x)^3}-\frac {b d}{(b c-a d)^2 (a+b x)^2}+\frac {b d^2}{(b c-a d)^3 (a+b x)}-\frac {d^3}{(b c-a d)^3 (c+d x)}\right ) \, dx}{2 b^3 g^3}\\ &=-\frac {15129 B (b c-a d)^2 n}{4 b^3 g^3 (a+b x)^2}-\frac {45387 B d (b c-a d) n}{2 b^3 g^3 (a+b x)}-\frac {45387 B d^2 n \log (a+b x)}{2 b^3 g^3}-\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b^3 g^3 (a+b x)^2}-\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3 (a+b x)}+\frac {15129 d^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3}+\frac {45387 B d^2 n \log (c+d x)}{2 b^3 g^3}+\frac {15129 B d^2 n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 g^3}-\frac {\left (15129 B d^2 n\right ) \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{b^3 g^3}-\frac {\left (15129 B d^2 n\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{b^2 g^3}\\ &=-\frac {15129 B (b c-a d)^2 n}{4 b^3 g^3 (a+b x)^2}-\frac {45387 B d (b c-a d) n}{2 b^3 g^3 (a+b x)}-\frac {45387 B d^2 n \log (a+b x)}{2 b^3 g^3}-\frac {15129 B d^2 n \log ^2(a+b x)}{2 b^3 g^3}-\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b^3 g^3 (a+b x)^2}-\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3 (a+b x)}+\frac {15129 d^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3}+\frac {45387 B d^2 n \log (c+d x)}{2 b^3 g^3}+\frac {15129 B d^2 n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 g^3}-\frac {\left (15129 B d^2 n\right ) \operatorname {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b^3 g^3}\\ &=-\frac {15129 B (b c-a d)^2 n}{4 b^3 g^3 (a+b x)^2}-\frac {45387 B d (b c-a d) n}{2 b^3 g^3 (a+b x)}-\frac {45387 B d^2 n \log (a+b x)}{2 b^3 g^3}-\frac {15129 B d^2 n \log ^2(a+b x)}{2 b^3 g^3}-\frac {15129 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 b^3 g^3 (a+b x)^2}-\frac {30258 d (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3 (a+b x)}+\frac {15129 d^2 \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^3 g^3}+\frac {45387 B d^2 n \log (c+d x)}{2 b^3 g^3}+\frac {15129 B d^2 n \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b^3 g^3}+\frac {15129 B d^2 n \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{b^3 g^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.35, size = 258, normalized size = 1.07 \[ \frac {i^2 \left (4 d^2 \log (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+\frac {8 d (a d-b c) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a+b x}-\frac {2 (b c-a d)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{(a+b x)^2}-2 B d^2 n \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{a d-b c}\right )\right )+\frac {6 B d n (a d-b c)}{a+b x}-\frac {B n (b c-a d)^2}{(a+b x)^2}-6 B d^2 n \log (a+b x)+6 B d^2 n \log (c+d x)\right )}{4 b^3 g^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.91, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {A d^{2} i^{2} x^{2} + 2 \, A c d i^{2} x + A c^{2} i^{2} + {\left (B d^{2} i^{2} x^{2} + 2 \, B c d i^{2} x + B c^{2} i^{2}\right )} \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right )}{b^{3} g^{3} x^{3} + 3 \, a b^{2} g^{3} x^{2} + 3 \, a^{2} b g^{3} x + a^{3} g^{3}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.45, size = 0, normalized size = 0.00 \[ \int \frac {\left (d i x +c i \right )^{2} \left (B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )+A \right )}{\left (b g x +a g \right )^{3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\frac {1}{2} \, B c d i^{2} n {\left (\frac {3 \, a b c - a^{2} d + 2 \, {\left (2 \, b^{2} c - a b d\right )} x}{{\left (b^{5} c - a b^{4} d\right )} g^{3} x^{2} + 2 \, {\left (a b^{4} c - a^{2} b^{3} d\right )} g^{3} x + {\left (a^{2} b^{3} c - a^{3} b^{2} d\right )} g^{3}} + \frac {2 \, {\left (2 \, b c d - a d^{2}\right )} \log \left (b x + a\right )}{{\left (b^{4} c^{2} - 2 \, a b^{3} c d + a^{2} b^{2} d^{2}\right )} g^{3}} - \frac {2 \, {\left (2 \, b c d - a d^{2}\right )} \log \left (d x + c\right )}{{\left (b^{4} c^{2} - 2 \, a b^{3} c d + a^{2} b^{2} d^{2}\right )} g^{3}}\right )} + \frac {1}{4} \, B c^{2} i^{2} n {\left (\frac {2 \, b d x - b c + 3 \, a d}{{\left (b^{4} c - a b^{3} d\right )} g^{3} x^{2} + 2 \, {\left (a b^{3} c - a^{2} b^{2} d\right )} g^{3} x + {\left (a^{2} b^{2} c - a^{3} b d\right )} g^{3}} + \frac {2 \, d^{2} \log \left (b x + a\right )}{{\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} g^{3}} - \frac {2 \, d^{2} \log \left (d x + c\right )}{{\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} g^{3}}\right )} + \frac {1}{2} \, A d^{2} i^{2} {\left (\frac {4 \, a b x + 3 \, a^{2}}{b^{5} g^{3} x^{2} + 2 \, a b^{4} g^{3} x + a^{2} b^{3} g^{3}} + \frac {2 \, \log \left (b x + a\right )}{b^{3} g^{3}}\right )} + \frac {1}{2} \, B d^{2} i^{2} {\left (\frac {{\left (4 \, a b x + 3 \, a^{2} + 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} \log \left (b x + a\right )\right )} \log \left ({\left (b x + a\right )}^{n}\right ) - {\left (4 \, a b x + 3 \, a^{2} + 2 \, {\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} \log \left (b x + a\right )\right )} \log \left ({\left (d x + c\right )}^{n}\right )}{b^{5} g^{3} x^{2} + 2 \, a b^{4} g^{3} x + a^{2} b^{3} g^{3}} + 2 \, \int \frac {2 \, b^{3} d x^{3} \log \relax (e) + 2 \, b^{3} c x^{2} \log \relax (e) - 3 \, a^{2} b c n + 3 \, a^{3} d n - 4 \, {\left (a b^{2} c n - a^{2} b d n\right )} x - 2 \, {\left (a^{2} b c n - a^{3} d n + {\left (b^{3} c n - a b^{2} d n\right )} x^{2} + 2 \, {\left (a b^{2} c n - a^{2} b d n\right )} x\right )} \log \left (b x + a\right )}{2 \, {\left (b^{6} d g^{3} x^{4} + a^{3} b^{3} c g^{3} + {\left (b^{6} c g^{3} + 3 \, a b^{5} d g^{3}\right )} x^{3} + 3 \, {\left (a b^{5} c g^{3} + a^{2} b^{4} d g^{3}\right )} x^{2} + {\left (3 \, a^{2} b^{4} c g^{3} + a^{3} b^{3} d g^{3}\right )} x\right )}}\,{d x}\right )} - \frac {{\left (2 \, b x + a\right )} B c d i^{2} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right )}{b^{4} g^{3} x^{2} + 2 \, a b^{3} g^{3} x + a^{2} b^{2} g^{3}} - \frac {{\left (2 \, b x + a\right )} A c d i^{2}}{b^{4} g^{3} x^{2} + 2 \, a b^{3} g^{3} x + a^{2} b^{2} g^{3}} - \frac {B c^{2} i^{2} \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right )}{2 \, {\left (b^{3} g^{3} x^{2} + 2 \, a b^{2} g^{3} x + a^{2} b g^{3}\right )}} - \frac {A c^{2} i^{2}}{2 \, {\left (b^{3} g^{3} x^{2} + 2 \, a b^{2} g^{3} x + a^{2} b g^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (c\,i+d\,i\,x\right )}^2\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{{\left (a\,g+b\,g\,x\right )}^3} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________